home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / DTS Sample Code / DTS Japan-Sample Code / QuickTime•MacApp2.0•6.0.7 / MDemoText.cp < prev    next >
Encoding:
Text File  |  1992-02-05  |  1.9 KB  |  70 lines  |  [TEXT/MPS ]

  1. /*******************************************************************************
  2. *
  3. * File:   MDemoText.cp
  4. *
  5. * Description: Main Program
  6. *
  7. *
  8. * Copyright © 1985 - 1990 by Apple Computer, Inc. All rights reserved.
  9. *
  10. * Copyright © 1991 by Taro Tanaka, Japan DTS, Apple Computer Japan, Inc. All rights reserved.
  11. *
  12. ********************************************************************************/
  13. #define  __MDEMOTEXT__
  14.  
  15. //  {$MC68020-}                                                // The main program must be universal code
  16. //  {$MC68881-}
  17.  
  18.         // • MacApp
  19. #include <UMacApp.h>
  20.  
  21.         // • Building Blocks
  22. #include <UPrinting.h>
  23. #include <UTEView.h>
  24.  
  25.         // • Implementation use
  26. #ifndef __UDEMOTEXT__
  27. #include "UDemoText.h"
  28. #endif
  29.  
  30. #pragma segment Main
  31.  
  32.     TDemoTextApplication *gDemoTextApplication;
  33.  
  34. void main()
  35.     {
  36.     long        gestraltResult;
  37.     
  38.     InitToolBox();                                             // Essential toolbox and utilities
  39.                                                             // initialization
  40.     FailOSErr(Gestalt(gestaltQuickTime,&gestraltResult));
  41.     FailOSErr(EnterMovies());
  42.     if (ValidateConfiguration(&gConfiguration))                // Make sure we can run
  43.     
  44.         {
  45.  
  46.         // Continue with remainder of initialization
  47.         InitUMacApp(8);                                     // Initialize MacApp; 8 calls to MoreMasters
  48.  
  49.         // ------------------------------------------------------
  50.         // If you are going to use streams for debugging IO then:
  51.         // #include <stdio.h>
  52.         // #include <iostream.h>
  53.         // and execute the following line since MacApp's debug output is essentialy "printf"s
  54.  
  55.         // cout.sync_with_stdio();
  56.  
  57.         InitUPrinting();                                    // Initialize the Printing unit
  58.         InitUTEView();                                        // Initialize the TEView unit
  59.         
  60.         gDemoTextApplication = new TDemoTextApplication;    // Create an application object
  61.         FailNIL(gDemoTextApplication);
  62.         gDemoTextApplication->IDemoTextApplication();        // Initialize the application
  63.         gDemoTextApplication->Run();                        // Run the application
  64.         ExitMovies();
  65.         }
  66.     else
  67.         {
  68.         StdAlert(phUnsupportedConfiguration);
  69.         }
  70.     }